<template>
	<view class="houseprize-record-packbox">
		<view class="houseprize-record-box">
			<view class="record-item relative" v-if="commonConfigs && commonConfigs.domainFrontFileLink" 
				v-for="(item, index) in resLists" :key="index" 
				:style="{'background-image': `url(${commonConfigs.domainFrontFileLink}/files/images/welfareHouse/img-border.png)`}">
				<view class="flex record-info">
					<view class="record-cover flex-all-center" v-if="commonConfigs && commonConfigs.domainFrontFileLink" 
					:style="{
						'background-size': '100% 100%',
						'background-image': `url(${commonConfigs.domainFrontFileLink}/files/images/welfareHouse/goods-bg.png)`
					}">
						<image :src="item.reward_item_cover" :class="['record-cover-award', item.type === 3 ? 'reward-cover-three' : '']" mode="heightFix"/>
					</view>
					
					<view class="info-box">
						<view class="info-name truncate">{{ item.reward_item_name }}</view>
						<view class="flex flex-align-items-center flex-justify-content-between">
							<view style="width: 50%;font-size: 24rpx;color: #63FFF7;">价值：{{ item.recovery_price_balance }}
								<text v-if="item.type === 3">*{{ item.num }}</text>
								<text v-else>机能</text>
							</view>
							<view style="color: #FFFFFF;font-size: 24rpx;">{{ item.update_time }}</view>
						</view>
					</view>
				</view>
				<view class="record-tips">奖品已自动发放</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'comHousePrizeRecord',
		props: {
			resLists: Array
		},
		data() {
			return {
				
			}
		},
		computed:{
			commonConfigs() {
				return this.$store.getters.commonConfigs || {};
			}
		},
	};
</script>

<style lang="scss" scoped>
	.houseprize-record-packbox {
		width: 100%;

		.houseprize-record-box {
			width: 686rpx;
			height: 100%;
			margin: 0 auto;
			color: #111111;

			.record-item {
				margin-top: 28rpx;
				width: 100%;
				height: 234rpx;
				padding: 28rpx 32rpx 22rpx 28rpx;
				background-size: 100% 100%;

				.record-info {
					padding-bottom: 28rpx;
					border-bottom: 2rpx solid #DBE0E9;
				}

				.record-cover {
					width: 100rpx;
					height: 100rpx;
					padding: 8rpx;
					margin-right: 18rpx;
					overflow: hidden;
					
					.record-cover-award {
						width: 100%;
						height: 100%;
						border-radius: 8rpx;
					}
					
					.reward-cover-three {
						width: 56rpx;
						height: 66rpx;
					}
				}

				.info-box {
					width: 88%;
					.info-name {
						width: 100%;
						margin-bottom: 16rpx;
						font-size: 28rpx;
						color: #FFFFFF;
					}
				}
			}

			.record-tips {
				text-align: center;
				margin-top: 16rpx;
				color: #FFFFFF;
				font-size: 24rpx;
			}
		}
	}
</style>
